#ifndef PLAYER_H
#define PLAYER_H

#include <QGraphicsObject>
#include "data/Card.h"
class Status
{
    friend class StatusItem;
    friend class Player;
public:
    Status(int type,Card*card){this->type=type;this->card=card;}
private:
    int type;
    Card*card;
};

class Player:public QObject
{
    Q_OBJECT
public:
    Player(int id,int color);
    void setHandCardsMax(int howMany);
    void setCrossNum(int howMany);
    void setGem(int howMany);
    void setCrystal(int howMany);
    void setEnergyMax(int howMany);
    void changeHandCardNum(int increase){handCardsNum+=increase;}
    void addStatus(int type,Card* card);
    void removeStatus(Card* card);
    bool checkStatus(int type);
    int getID();
    QString getName();
    int getHandCardMax();
    int getHandCardNum();
    int getCrossNum();
    int getCrossMax();
    int getGem();
    int getCrystal();
    int getEnergy();
    int getEnergyMax();
    int getColor();
    void setInfo(int roleID);
    QString getInfo();
signals:
    void addStatusSIG(Status *status);
    void removeStatusSIG(Status *status);
protected:
    int id;
    QString name;
    int handCardsMax;
    int handCardsNum;
    int crossNum;
    int crossMax;
    int gem;
    int crystal;
    int energyMax;
    int color;
    QList<Status*> statusList;
    QString info;

};


#endif // PLAYER_H
